package com.liuxing.javaSpringBoot.modules.account.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * Created by IntelliJ IDEA.
 * @File AccountController.java
 * @Auth liuxing
 * @Date 2021/8/26 10:20
 * @Email liuxing997@foxmail.com
 */
@Controller
public class AccountController {

    /**
     * 127.0.0.1/login ---get
     * @param modelMap
     * @return indexSimple2
     */
    @GetMapping("/login")
    public String loginPage(ModelMap modelMap){
        modelMap.put("template","account/login");
        return "indexSimple2";
    }

    /**
     * 127.0.0.1/register ---get
     * @param modelMap
     * @return indexSimple2
     */
    @GetMapping("/register")
    public String registerPage(ModelMap modelMap){
        modelMap.put("template","account/register");
        return "indexSimple2";
    }

    /**
     * 127.0.0.1/account/profile ---- get
     */
    @GetMapping("/account/profile")
    public String profilePage() {
        return "index";
    }

    /**
     * 127.0.0.1/account/users --- get
     * @return
     */
    @GetMapping("/account/users")
    public String usersPage(){
        return "index";
    }

    /**
     * 127.0.0.1/account/roles ---- get
     */
    @GetMapping("/account/roles")
    public String rolesPage() {
        return "index";
    }

    /**
     * 127.0.0.1/account/resources ---- get
     */
    @GetMapping("/account/resources")
    public String resourcesPage() {
        return "index";
    }

}
